public class Goodtest36 {
    public static void main(String[] args) {
        Goods[] arr = new Goods[4];
        Goods g1 = new Goods("001","手机",4999,50);
        Goods g2 = new Goods("002","手机壳",9,100);
        Goods g3 = new Goods("003","手机支架",10,100);
        Goods g4 = new Goods("004","钢化膜",20,150);
        arr[0] = g1;
        arr[1] = g2;
        arr[2] = g3;
        arr[3] = g4;
        for (int i = 0; i < arr.length; i++) {
            Goods g = arr[i];
            System.out.println(g.getId() + "," + g.getName() + "," + g.getPrice());
        }
    }
}
